<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const str = "abxdcef";
      console.log(str.indexOf("c", 2));
      console.log(str.indexOf("c"));
      console.log(str.lastIndexOf("c", 4));

      /* const str = {
        0: "a",
        1: "b",
        2: "c",
        3: "d",
        4: "c"
        5: "e",
        6: "f",
      }; */
    </script>
  </body>
</html>
